<template>
  <ant-modal
    modalWidth="576"
    modalHeight="500"
    :visible="open"
    :modal-title="formTitle"
    :adjust-size="true"
    @cancel="cancel"
  >
    <a-form-model ref="form" :model="form" :rules="rules" slot="content" layout="vertical">
      <a-row :gutter="32">
        <a-col :span="12">
          <a-form-model-item label="镜像ID" prop="imageId">
            <a-input v-model="form.imageId" placeholder="请输入镜像ID"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="镜像仓库" prop="imageRepository">
            <a-input v-model="form.imageRepository" placeholder="请输入镜像仓库"/>
          </a-form-model-item>
        </a-col>
      </a-row>
      <a-row :gutter="32">
        <a-col :span="12">
          <a-form-model-item label="镜像Tag" prop="imageTag">
            <a-input v-model="form.imageTag" placeholder="请输入镜像Tag"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="镜像创建时间" prop="imageCreateTime">
            <a-date-picker
              v-model="form.imageCreateTime"
              valueFormat="YYYY-MM-DD"
              :show-today="true"
              placeholder="选择日期"
              style="width: 100%"
            />
          </a-form-model-item>
        </a-col>
      </a-row>
      <a-row :gutter="32">
        <a-col :span="12">
          <a-form-model-item label="镜像大小" prop="imageSize">
            <a-input v-model="form.imageSize" placeholder="请输入镜像大小"/>
          </a-form-model-item>
        </a-col>
      </a-row>
    </a-form-model>
    <template slot="footer">
      <a-button :disabled="disabled" @click="cancel">
        取消
      </a-button>
      <a-button type="primary" :disabled="disabled" @click="submitForm(true)">
        保存
      </a-button>
    </template>
  </ant-modal>
</template>
<script>
import ImageAddForm from './ImageForm'
export default {
  ...ImageAddForm
}
</script>
